<template type="text" id="contextmenuTpl">
  <ul id="Js-page-contextmenu" class="dropdown-menu" style="left:<%clientX%>px;top:<%clientY%>px;display:block;">
      <li><a id="Js-page-addFile" href="javascript:;">创建文件</a></li>
      <li><a id="Js-page-addCate" href="javascript:;">创建目录</a></li>
  </ul>
</template>

<template type="text" id="copyTpl">
  <ul id="Js-page-contextmenu" class="dropdown-menu" style="left:<%clientX%>px;top:<%clientY%>px;display:block;">
      <li><a id="Js-pcPage-copy" href="javascript:;">拷贝地址</a></li>
  </ul>
</template>

<template type="text" id="pcPageTpl">
    <div id="Js-html" style="display:none"></div>
    <div class="pcPage-container container-fluid">
      <div class="row-fluid">
        <div id="accordion" class="panel-group collapse pcPage-list" aria-multiselectable="true" role="tablist">
          <div class="panel panel-default">
            <div id="headingTwo" role="tab" class="panel-heading">
              <h4 class="panel-title">
                <a aria-controls="collapseTwo" aria-expanded="true" href="#collapseTwo" data-parent="#accordion" data-toggle="collapse" role="button" class="collapsed">
                  列表
                </a>
              </h4>
            </div>
            <div id="collapseTwo" class="panel-collapse collapse in" aria-labelledby="headingTwo" role="tabpanel">
              <div id="Js-pcPage-cate" style="overflow-y: auto;">
                <div id="Js-page-list" class="panel-body ztree"></div>
              </div>
            </div>
          </div>
          <div class="panel panel-default">
          <div id="headingOne" role="tab" class="panel-heading">
            <h4 class="panel-title">
              <a aria-controls="collapseOne" aria-expanded="false" href="#collapseOne" data-parent="#accordion" data-toggle="collapse" role="button" class="collapsed">
                编辑
              </a>
            </h4>
          </div>
          <div id="collapseOne" class="panel-collapse collapse" aria-labelledby="headingOne" role="tabpanel" aria-expanded="true">
            <div class="spanleft layoutColumn">
              <div class="pcPage-btn-control">
                <button class="btn btn-primary pagePc-button" id="Js-pageCss" type="button"><i class="glyphicon glyphicon-leaf"></i>样式</button>
                <button class="btn btn-primary pagePc-button" id="Js-pageScript" type="button"><i class="glyphicon glyphicon-fire"></i>脚本</button>
                <button class="btn btn-primary pagePc-button" id="Js-pageSetting" type="button"><i class="glyphicon glyphicon-cog"></i>设置</button>
                <button class="btn btn-success pagePc-button" id="Js-pageSave" type="button"><i class="glyphicon glyphicon-save"></i>保存</button>
              </div>
              <div class="sidebar-nav">
                <ul class="nav nav-list accordion-group">
                  <li class="nav-header">
                    <i class="glyphicon glyphicon-plus"></i> 布局设置 </li>
                  <li style="display: list-item;" class="rows" id="estRows">
                    <div class="lyrow ui-draggable"> <a href="#close" class="remove label label-important pcPage-btn"><i class="glyphicon glyphicon-remove"></i>删除</a> <span class="drag label pcPage-btn"><i class="glyphicon glyphglyphicon glyphicon-move"></i>拖动</span>
                      <div class="preview">
                        <input value="通屏" type="text" readonly class="form-control">
                      </div>
                      <div class="view">
                        <div class="row-fluid clearfix row-full">
                          <div class=" column"></div>
                        </div>
                      </div>
                    </div>
                    <div class="lyrow ui-draggable"> <a href="#close" class="remove label label-important pcPage-btn"><i class="glyphicon glyphicon-remove"></i>删除</a> <span class="drag label pcPage-btn"><i class="glyphicon glyphglyphicon glyphicon-move"></i>拖动</span><span class="configuration pcPage-background"><button type="button" class="btn btn-mini Js-pcPage-background">背景</button> </span>
                      <div class="preview">
                        <input value="12" type="text" class="form-control">
                      </div>
                      <div class="view">
                        <div class="row-fluid clearfix">
                          <div class="span12 column wrapper"></div>
                        </div>
                      </div>
                    </div>
                    <div class="lyrow ui-draggable"> <a href="#close" class="remove label label-important pcPage-btn"><i class="glyphicon glyphicon-remove"></i>删除</a> <span class="drag label pcPage-btn"><i class="glyphicon glyphicon-move"></i>拖动</span>
                      <div class="preview">
                        <input value="6 6" type="text" class="form-control">
                      </div>
                      <div class="view">
                        <div class="row-fluid clearfix">
                          <div class="span6 column"></div>
                          <div class="span6 column"></div>
                        </div>
                      </div>
                    </div>
                    <div class="lyrow ui-draggable"> <a href="#close" class="remove label label-important pcPage-btn"><i class="glyphicon glyphicon-remove"></i>删除</a> <span class="drag label pcPage-btn"><i class="glyphicon glyphicon-move"></i>拖动</span>
                      <div class="preview">
                        <input value="8 4" type="text" class="form-control">
                      </div>
                      <div class="view">
                        <div class="row-fluid clearfix">
                          <div class="span8 column"></div>
                          <div class="span4 column"></div>
                        </div>
                      </div>
                    </div>
                    <div class="lyrow ui-draggable"> <a href="#close" class="remove label label-important pcPage-btn"><i class="glyphicon glyphicon-remove"></i>删除</a> <span class="drag label pcPage-btn"><i class="glyphicon glyphicon-move"></i>拖动</span>
                      <div class="preview">
                        <input value="4 4 4" type="text" class="form-control">
                      </div>
                      <div class="view">
                        <div class="row-fluid clearfix">
                          <div class="span4 column"></div>
                          <div class="span4 column"></div>
                          <div class="span4 column"></div>
                        </div>
                      </div>
                    </div>
                    <div class="lyrow ui-draggable"> <a href="#close" class="remove label label-important pcPage-btn"><i class="glyphicon glyphicon-remove"></i>删除</a> <span class="drag label pcPage-btn"><i class="glyphicon glyphicon-move"></i>拖动</span>
                      <div class="preview">
                        <input value="2 6 4" type="text" class="form-control">
                      </div>
                      <div class="view">
                        <div class="row-fluid clearfix">
                          <div class="span2 column"></div>
                          <div class="span6 column"></div>
                          <div class="span4 column"></div>
                        </div>
                      </div>
                    </div>
                  </li>
                </ul>
                <ul class="nav nav-list accordion-group">
                  <li class="nav-header"><i class="glyphicon glyphicon-plus"></i> 组件</li>
                  <li style="display: none;" class="boxes" id="elmBase">

                    <div class="box box-element ui-draggable ui-sortable-handle"> <a href="#close" class="remove label label-important pcPage-btn"><i class="glyphicon glyphicon-remove"></i>删除</a> <span class="drag label pcPage-btn"><i class="glyphicon glyphicon-move"></i>拖动</span> 
                         <span class="configuration"><button type="button" class="btn btn-mini Js-pcPage-edit">编辑</button> <span class="btn-group"> <a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#">对齐 <span class="caret"></span></a>
                      <ul class="dropdown-menu">
                        <li class="active"><a href="#" rel="">默认</a></li>
                        <li class=""><a href="#" rel="text-left">靠左</a></li>
                        <li class=""><a href="#" rel="text-center">居中</a></li>
                        <li class=""><a href="#" rel="text-right">靠右</a></li>
                      </ul>
                      </span> 
                    </span>
                      <div class="preview">内容</div>
                      <div class="view">
                        <h3 class="content" contenteditable="true">千石系统，哇哈哈！！！</h3>
                      </div>
                    </div>
                    <div class="box box-element ui-draggable"> <a href="#close" class="remove label label-important pcPage-btn"><i class="glyphicon glyphicon-remove"></i>删除</a> <span class="drag label pcPage-btn"><i class="glyphicon glyphicon-move"></i>拖动</span> <span class="configuration"><button type="button" class="btn btn-mini Js-pcPage-edit">编辑</button> <a class="btn btn-mini Js-productId" href="javascript:;" >商品ID</a> </span>
                      <div class="preview">商品</div>
                      <div class="view">请添加商品</div>
                    </div>
                  </li>
                </ul>

                <ul class="nav nav-list accordion-group">
                  <li class="nav-header"><i class="glyphicon glyphicon-plus"></i> 交互组件</li>
                  <li style="display: none;" class="boxes mute" id="elmJS">


                    <div class="box box-element ui-draggable"> <a href="#close" class="remove label label-important pcPage-btn"><i class="glyphicon glyphicon-remove"></i>删除</a> <span class="drag label pcPage-btn"><i class="glyphicon glyphicon-move"></i>拖动</span> <span class="configuration"><button type="button" class="btn btn-mini Js-pcPage-edit">编辑</button> <span class="btn-group"> <a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#">位置 <span class="caret"></span></a>
                      <ul class="dropdown-menu">
                        <li class="active"><a href="#" rel="">默认</a></li>
                        <li class=""><a href="#" rel="tabs-below">底部</a></li>
                        <li class=""><a href="#" rel="tabs-left">靠左</a></li>
                        <li class=""><a href="#" rel="tabs-right">靠右</a></li>
                      </ul>
                      </span> </span>
                      <div class="preview">切换卡</div>
                      <div class="view">
                        <div class="tabbable" id="myTabs"> <!-- Only required for left/right tabs -->
                          <ul class="nav nav-tabs">
                            <li class="active"><a href="#tab1" data-toggle="tab" contenteditable="true">第一部分</a></li>
                            <li><a href="#tab2" data-toggle="tab" contenteditable="true">第二部分</a></li>
                          </ul>
                          <div class="tab-content">
                            <div class="tab-pane active" id="tab1" contenteditable="true">
                              <p>第一部分内容.</p>
                            </div>
                            <div class="tab-pane" id="tab2" contenteditable="true">
                              <p>第二部分内容.</p>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="box box-element ui-draggable"> <a href="#close" class="remove label label-important pcPage-btn"><i class="glyphicon glyphicon-remove"></i>删除</a> <span class="drag label pcPage-btn"><i class="glyphicon glyphicon-move"></i>拖动</span>
                      <span class="configuration"><button type="button" class="btn btn-mini Js-pcPage-edit">编辑</button></span>
                      <div class="preview">轮换图</div>
                      <div class="view">
                        <div class="carousel slide" id="myCarousel" style="overflow:hidden;">
                          <ol class="carousel-indicators">
                            <li class="active" data-slide-to="0" data-target="#myCarousel"></li>
                            <li data-slide-to="1" data-target="#myCarousel" class=""></li>
                            <li data-slide-to="2" data-target="#myCarousel" class=""></li>
                          </ol>
                          <div class="carousel-inner">
                            <div class="item active"> <img alt="" src="/res/images/pcPage/1.jpg">
                              <div class="carousel-caption" contenteditable="true">
                                <h4>棒球</h4>
                                <p>棒球运动是一种以棒打球为主要特点，集体性、对抗性很强的球类运动项目，在美国、日本尤为盛行。</p>
                              </div>
                            </div>
                            <div class="item"> <img alt="" src="/res/images/pcPage/2.jpg">
                              <div class="carousel-caption" contenteditable="true">
                                <h4>冲浪</h4>
                                <p>冲浪是以海浪为动力，利用自身的高超技巧和平衡能力，搏击海浪的一项运动。运动员站立在冲浪板上，或利用腹板、跪板、充气的橡皮垫、划艇、皮艇等驾驭海浪的一项水上运动。</p>
                              </div>
                            </div>
                            <div class="item"> <img alt="" src="/res/images/pcPage/3.jpg">
                              <div class="carousel-caption" contenteditable="true">
                                <h4>自行车</h4>
                                <p>以自行车为工具比赛骑行速度的体育运动。1896年第一届奥林匹克运动会上被列为正式比赛项目。环法赛为最著名的世界自行车锦标赛。</p>
                              </div>
                            </div>
                          </div>
                          <a data-slide="prev" href="#myCarousel" class="left carousel-control">‹</a> <a data-slide="next" href="#myCarousel" class="right carousel-control">›</a> </div>
                      </div>
                    </div>
                  </li>
                </ul>
<!--                 <ul class="nav nav-list accordion-group">
                  <li class="nav-header"><i class="glyphicon glyphicon-plus"></i> 应用扩展 </li>
                  <li style="display: none;" class="boxes mute" id="elmComm">
                    <div class="preview">建设中...</div>
                  </li>
                </ul> -->
              </div>
            </div>
            </div>
            </div>
          </div>
          <div id="Js-pcPage-content" data-content="页面1" class="pcPage-content ui-sortable layoutColumn" ></div>
            <!--/span-->
            <!--/span-->
          </div>
          <!--/row--> 
        </div>
        <!--/.fluid-container--> 
        <div class="modal hiden fade" role="dialog" id="editorModal">
          <div style="width:645px;height:525px;">
            <div class="modal-header"> <a class="close Js-dialog-close" data-dismiss="modal">×</a>
              <h3>编辑</h3>
            </div>
            <div class="modal-body">
              <p>
                <textarea id="contenteditor"></textarea>
              </p>
            </div>
            <div class="modal-footer"> <a id="savecontent" class="btn btn-primary" data-dismiss="modal">保存</a> <a class="btn Js-dialog-close" data-dismiss="modal">关闭</a> </div>
          </div>
        </div>
        <div class="modal hide fade" role="dialog" id="downloadModal">
          <div class="modal-header"> <a class="close" data-dismiss="modal">×</a>
            <h3>下载</h3>
          </div>
          <div class="modal-body">
            <p>已在下面生成干净的HTML, 可以复制粘贴代码到你的项目.</p>
            <div class="btn-group">
              <button type="button" id="fluidPage" class="active btn btn-info"><i class="icon-fullscreen icon-white"></i> 自适应宽度</button>
              <button type="button" class="btn btn-info" id="fixedPage"><i class="icon-screenshot icon-white"></i> 固定宽度</button>
            </div>
            <br>
            <br>
            <p>
              <textarea></textarea>
            </p>
          </div>
          <div class="modal-footer"> <a class="btn" data-dismiss="modal">关闭</a> </div>
        </div>
        <div class="modal hide fade" role="dialog" id="shareModal">
          <div class="modal-header"> <a class="close" data-dismiss="modal">×</a>
            <h3>保存</h3>
          </div>
          <div class="modal-body">保存成功</div>
          <div class="modal-footer"> <a class="btn" data-dismiss="modal">Close</a> </div>
    </div>
</template>

<template type="text" id="pcPage-inputProductID">
  <p class="pcPage-productId">
    <div class="pcPage-proSelect">
      <label><input type="radio" name="productType" value="1" checked>普通商品</label>
      <label><input type="radio" name="productType" value="2">九段商品</label>
    </div>
    <textarea id="pcPage-proId" class="form-control" placeholder="多个商品以分号隔开"></textarea>
  </p>
</template>

<template type="text" id="pcPage-production">
  <%for(var i=0;i<goods.length;i++){%>
    <div class="products" skuid="<%goods[i].basicID%>">
      <a title="<%goods[i].goodsName%>" target="_blank" href="http://www.tootoo.cn/product-s1-<%goods[i].basicID%>-zh_cn.html">
        <img src="<%goods[i].picInfo.picPaths[0].picPath%>" alt="<%goods[i].goodsName%>" title="<%goods[i].goodsName%>">
      </a>
      <p class="price">
        ￥<%goods[i].price%>
        </p> 
        <a class="breif" title="<%goods[i].goodsName%>" id="cms_name" target="_blank" href="http://www.tootoo.cn/product-s1-<%goods[i].basicID%>-zh_cn.html"><%goods[i].goodsTitle%></a>
          <p>
           <div class="toBuy Js-addCart" maxnum="999" minnum="1" buyfrom="0" stationid="1" promotetype="<%goods[i].skuInfo.promotionType%>" amount="1" skuid="<%goods[i].basicID%>" flyimg="<%goods[i].picInfo.picPaths[0].picPath%>">立即购买</div>
         </p>
      </div>
    <%}%>
</template>

<template type="text" id="pcPage-bgSelector">
  <ul class="pcPage-bgSelector">
    <li><span>背景色：</span><input id="pcPage-colorBG" value="#<%color%>" class="form-control pcPage-color" type="color"/></li>
    <li><span>背景图：</span><div class="btn btn-default pcPage-uploadBtn">上传</div><input type="file" wx-upload-param="type=1&online=1" wx-upload="/web/upload.action" wx-upload-set="pcPage-preview=path" name="file" id="Js-uploadIcon" ><div id="pcPage-preview" class="pcPage-preview" style="background-image:<%img%>"></div></li>
  </ul>
</template>

<template type="text" id="pcPage-script">
    <pre class="pcPage-code" id="Js-pcPage-code"><%jscode%></pre>
</template>

<template type="text" id="pcPage-css">
    <pre class="pcPage-code" id="Js-pcPage-css"><%csscode%></pre>
</template>